//
//  MCWithdrawMoneyTableViewCell.m
//  TLYL
//
//  Created by MC on 2017/7/10.
//  Copyright © 2017年 TLYL01. All rights reserved.
//

#import "MCWithdrawMoneyTableViewCell.h"
@interface MCWithdrawMoneyTableViewCell ()

@property (nonatomic,strong)UILabel * lab_money;
@property (nonatomic,strong)UILabel * lab_tip;

@end

@implementation MCWithdrawMoneyTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self){
        [self initView];
    }
    return self;
}

- (void)initView{

    self.backgroundColor=[UIColor whiteColor];
    
    _lab_money =[[UILabel alloc]initWithFrame:CGRectZero];
    _lab_money.textColor=RGB(60, 130, 207);
    _lab_money.font=[UIFont boldSystemFontOfSize:25];
    _lab_money.text =@"加载中";
    _lab_money.textAlignment=NSTextAlignmentLeft;
    [self  addSubview:_lab_money];
    
    _lab_tip =[[UILabel alloc]initWithFrame:CGRectZero];
    _lab_tip.textColor=RGB(100, 100, 100);
    _lab_tip.font=[UIFont systemFontOfSize:15];
    _lab_tip.text =@"账户余额(元)";
    _lab_tip.textAlignment=NSTextAlignmentLeft;
    [self  addSubview:_lab_tip];
    
    [self relayOutConstraints];
}



-(void)relayOutConstraints{
    
    [_lab_money mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.equalTo(self);
        make.left.equalTo(self.mas_left).offset(10);
    }];
    
    
    [_lab_tip mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.equalTo(self);
        make.left.equalTo(_lab_money.mas_right).offset(5);
    }];
    
}

-(void)setDataSource:(id)dataSource{
    
    _dataSource=dataSource;
    _lab_money.text =@"3,425.65";
    [_lab_tip mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.equalTo(self);
        make.left.equalTo(_lab_money.mas_right).offset(5);
    }];
    
}

+(CGFloat)computeHeight:(id)info{
    
    return 50;
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
